package pers.archives.loginToken.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import pers.archives.common.entity.User;

/*
 *@program:archives-parent
 *@author: 赵浩浩
 *@Time: 2020/8/20  10:46
 */
@Mapper
public interface UserMapper {

    @Results({
            @Result(property = "userId", column = "user_id"),
            @Result(property = "userName", column = "username"),
            @Result(property = "password", column = "password"),
            @Result(property = "name", column = "name"),
            @Result(property = "createTime", column = "create_time"),
            @Result(property = "updateTime", column = "update_time")
    })
    @Select("select user_id,username,password,name,create_time,update_time from user where username = #{username} ")
    User findByUserName(String username);
}
